package com.liangwj.springbootdesignpatterns.createTypePatterns.builder.demo_2;
/**
 * <b>Description:</b> ConcreteBuilder：实现Builder接口，针对不同的商业逻辑，具体化复杂对象的各部分的创建。<br/>
 * 在建造过程完成后，提供产品的实例。 <br/>
 * @author Lingwenjun
 * @date 2019/1/22-17:25
 * @version 1.0
 */
public class SmartManBuilder implements IBuilderHuman {

    private Human human;

    public SmartManBuilder() {
        human = new Human();
    }

    @Override
    public void buildHead() {
        human.setHead("大头");
    }

    @Override
    public void buildBody() {
        human.setBody("180kg");
    }

    @Override
    public void buildHands() {
        human.setHands("双手");
    }

    @Override
    public void buildFoots() {
        human.setFoots("42的脚");
    }

    @Override
    public Human createHuman() {
        return human;
    }
}
